<template>
    <el-container class="home-container">
        <el-header><el-button type="info" @click="logout" circle>退</el-button></el-header>
        <el-container>
            <el-aside width="auto">
                <MyMenu></MyMenu>
            </el-aside>
            <el-main>
                <router-view></router-view>
            </el-main>
        </el-container>
    </el-container>

</template>

<script>
    import MyMenu from './menu/MyMenu'
    export default {
        name: 'Home',
        data(){
            return{
                isCollapse:{
                    type : Boolean
                },
                iconCollapse : 'el-icon-arrow-right'
            }
        },
        components: { MyMenu },
        methods : {
                logout(){
                    window.sessionStorage.clear();
                    this.$router.push('/login')
                }
            }
    }
</script>

<style scoped>
    .home-container{
        height: 100%;
    }
    .el-header{
        background-color: aquamarine;
    }
    .el-aside{

        background-color: #545c64;
    }
    .el-main{
        background-color: gainsboro;
    }

</style>
